using UnityEngine.UI;

public class BubblePoints : GenericDialog
{
	public Button buttonUnlockArenas;

	public Text textPriceUnlockArenas;

	public Text textBonusLivesUnlockArenas;

	public Text textBonusWildcardsUnlockArenas;

	private void OnEnable()
	{
		if (Globals.appState != 0 && Globals.appState != AppState.unknown)
		{
			CustomAnalytics.LogUIEvent("Menu", "Points");
			GenericDialog.FireDialogEnabledEvent();
		}
	}

	private void UpdateControls()
	{
		buttonUnlockArenas.interactable = Economy.CanPurchase(IAPManager.ProductType.Unlock);
		textPriceUnlockArenas.text = Economy.GetFormattedPriceForProduct(IAPManager.ProductType.Unlock);
		textBonusLivesUnlockArenas.text = EconomySettings.livesBonusForUnlockPurchase.ToString();
		textBonusWildcardsUnlockArenas.text = EconomySettings.wildcardsBonusForUnlockPurchase.ToString();
	}

	public void OnButtonUnlock()
	{
		Audio.PlaySoundButton();
		CustomAnalytics.LogUIEvent("Menu", "Points - Unlock");
		UserInterface.GetInstance().DoPurchase(IAPManager.ProductType.Unlock);
	}
}
